/*
 * @Author: your name
 * @Date: 2020-03-26 09:41:08
 * @LastEditTime: 2020-03-26 09:41:10
 * @LastEditors: Please set LastEditors
 * @Description: 聚蜂园
 */

// 获取图形验证码
export const getImg = "http://106.54.66.52:6448/captcha/gen_img?key="
// 登录
export const getLogin = "http://106.54.66.52:6448/auth/login_4_web"
// 所有任务
export const getTaskList = "http://106.54.66.52:6448/task/list_plan_worker"
// 普通任务接单
export const getAcceptTask = "http://106.54.66.52:6448/task/accept_task"
// 流量任务接单
export const getFlowAcceptTask = "http://106.54.66.52:6448/task/accept_task_4_flow"

export function ajaxFun(url, param, fun) {
    window.api.ajax({
        url: url,
        method: param.type,
        headers: param.headers,
        dataType: 'json',
        returnAll: false,
        async: false,
        data: {
            values: param.data
        }
    }, fun)
}